/**
 * 匹配数字
 */
function matchNumber(num) {
  let reg = new RegExp("^[0-9]*$");
  return reg.test(num);
}

/**
 * 匹配字母和数字
 */
function matchWordAndNum(word) {
  let reg = new RegExp("^[A-Za-z0-9]+$");
  return reg.test(word);
}

module.exports = {
  "matchNumber": matchNumber,
  "matchWordAndNum": matchWordAndNum
}